package com.cpecc.model.system;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "SYS_jianZhi")
public class JianZhi implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 3440689034448096431L;

	@Id
	@GeneratedValue(generator = "system-uuid")
	@GenericGenerator(name = "system-uuid", strategy = "uuid")
	@Column(length = 32)
	private String id;
	
	@ManyToOne
	@JoinColumn(name="USER_ID")
	private User user;
	
	@ManyToOne
	@JoinColumn(name="DEP_ID")
	private Dep dep;
	
	@ManyToOne
	@JoinColumn(name="ROLE_ID")
	private Role role;
	
	@Column(length = 16)
	private String quanXian;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public Dep getDep() {
		return dep;
	}

	public void setDep(Dep dep) {
		this.dep = dep;
	}

	public Role getRole() {
		return role;
	}

	public void setRole(Role role) {
		this.role = role;
	}

	public String getQuanXian() {
		return quanXian;
	}

	public void setQuanXian(String quanXian) {
		this.quanXian = quanXian;
	}

	public JianZhi(String id, User user, Dep dep, Role role, String quanXian) {
		super();
		this.id = id;
		this.user = user;
		this.dep = dep;
		this.role = role;
		this.quanXian = quanXian;
	}

	public JianZhi() {
		super();
	}
}
